package com.spic.system.service.impl;

import com.spic.system.domain.SysAnnounceReceiver;
import com.spic.system.mapper.SysAnnounceReceiverMapper;
import com.spic.system.service.ISysAnnounceReceiverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 接收人信息Service业务层处理
 *
 * @author spic
 * @date 2022-06-15
 */
@Service
public class SysAnnounceReceiverServiceImpl implements ISysAnnounceReceiverService
{
    @Autowired
    private SysAnnounceReceiverMapper sysAnnounceReceiverMapper;

    /**
     * 查询接收人信息
     *
     * @param id 接收人信息主键
     * @return 接收人信息
     */
    @Override
    public SysAnnounceReceiver selectSysAnnounceReceiverById(Long id)
    {
        return sysAnnounceReceiverMapper.selectSysAnnounceReceiverById(id);
    }

    /**
     * 查询接收人信息列表
     *
     * @param sysAnnounceReceiver 接收人信息
     * @return 接收人信息
     */
    @Override
    public List<SysAnnounceReceiver> selectSysAnnounceReceiverList(SysAnnounceReceiver sysAnnounceReceiver)
    {
        return sysAnnounceReceiverMapper.selectSysAnnounceReceiverList(sysAnnounceReceiver);
    }

    /**
     * 新增接收人信息
     *
     * @param sysAnnounceReceiver 接收人信息
     * @return 结果
     */
    @Override
    public int insertSysAnnounceReceiver(SysAnnounceReceiver sysAnnounceReceiver)
    {
        return sysAnnounceReceiverMapper.insertSysAnnounceReceiver(sysAnnounceReceiver);
    }

    /**
     * 修改接收人信息
     *
     * @param sysAnnounceReceiver 接收人信息
     * @return 结果
     */
    @Override
    public int updateSysAnnounceReceiver(SysAnnounceReceiver sysAnnounceReceiver)
    {
        return sysAnnounceReceiverMapper.updateSysAnnounceReceiver(sysAnnounceReceiver);
    }

    /**
     * 批量删除接收人信息
     *
     * @param ids 需要删除的接收人信息主键
     * @return 结果
     */
    @Override
    public int deleteSysAnnounceReceiverByIds(Long[] ids)
    {
        return sysAnnounceReceiverMapper.deleteSysAnnounceReceiverByIds(ids);
    }

    /**
     * 删除接收人信息信息
     *
     * @param id 接收人信息主键
     * @return 结果
     */
    @Override
    public int deleteSysAnnounceReceiverById(Long id)
    {
        return sysAnnounceReceiverMapper.deleteSysAnnounceReceiverById(id);
    }
}
